<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let str = new String("abc");
        console.log(str)
        let name = 'admin';

        //模板字符串 ``
        console.log(`我的名字叫${name}`);

        console.log("o".padEnd(5,"p"));
        console.log("o".padStart(5,"p"));
        console.log("===".repeat(30));

        //截取[1,3) 下标
        console.log("hello".substring(1,3));//el

        //从下标1开始,截取3个长度
        console.log("hello".substr(1,3));//ell

        console.log("hello".length);//5
        console.log("hello".toUpperCase());

        console.log("hello".charAt(1));
        //如果出现第二个参数,代表是从这个下标开始的位置判断,默认从0开始
        console.log("hello".includes("e",1));//true

        //提取,[start,end)
        console.log("hello".slice(1,3));//el

        console.log("192:567:2".split(":"));
    </script>
</body>
</html>l